home *** CD-ROM | disk | FTP | other *** search
/ Champak 26 (Anniversary Edition) / Volume 26 [Anniversary Edition] - JOGO DISK .iso / DEPOSITO / sb_bust.swf / scripts / __Packages / GarryObj.as < prev    next >
Text File  |  2006-07-26  |  1KB  |  52 lines

  1. class GarryObj
  2. {
  3.    function GarryObj(l_RefMov)
  4.    {
  5.       _global.C.G_Items.push(l_RefMov._name);
  6.       this.RefMov = l_RefMov;
  7.       this.Nom = this.RefMov._name;
  8.       this.State = "PasLa";
  9.       this.StateOld = "PasLa";
  10.       this.SADammage = 25;
  11.       this.SAPts = 1000;
  12.    }
  13.    function IsThrow()
  14.    {
  15.       if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
  16.       {
  17.          if(_global.C.Enemy.CanBeHit and _global.C.Player.State != "Die" and _global.C.Player.State != "Dead" and _global.C.Player.State != "Win")
  18.          {
  19.             _global.C.Enemy.CanBeHit = false;
  20.             _global.C.Enemy.CanBloc = false;
  21.             _global.C.Enemy.State = "GetSnail";
  22.             this.State = "PasLa";
  23.          }
  24.          else
  25.          {
  26.             this.State = "Miss";
  27.          }
  28.       }
  29.    }
  30.    function Miss()
  31.    {
  32.       if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
  33.       {
  34.          this.State = "PasLa";
  35.       }
  36.    }
  37.    function ChangeState(l_NewAction)
  38.    {
  39.       if(this.StateOld != l_NewAction)
  40.       {
  41.          this.StateOld = this.State;
  42.          this.State = l_NewAction;
  43.          this.RefMov.gotoAndStop(l_NewAction);
  44.       }
  45.    }
  46.    function Actions()
  47.    {
  48.       this.ChangeState(this.State);
  49.       this[this.State]();
  50.    }
  51. }
  52.